<div class="container">
    <div class="bg-putih">

        <div class="jdl-page">
          <?php echo isset($judul)?$judul:'<font color="#ccc">Judul Belum Diberikan</font>'; ?>
          <div class="clearfix"></div>
        </div>
            
        <?php echo display_flash(); ?>

        <?php echo form_open('pengaturan', array('role' => 'form', 'class' => 'form-horizontal', 'id' => 'form'));?>
            <div class="form-group">
                <label class="col-xs-3 control-label">Nama Aplikasi</label>
                <div class="col-xs-3">
                    <input id="aa" value="<?php echo site_title();?>" type="text" name="site_title" class="form-control input-sm" placeholder="Nama Aplikasi">
                </div>                            
            </div>
            <div class="form-group">
                <label class="col-xs-3 control-label">Tagline</label>
                <div class="col-xs-7">
                    <input value="<?php echo site_tagline();?>" type="text" name="site_tagline" class="form-control input-sm" placeholder="Tagline">
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-3 control-label">Deskripsi Aplikasi</label>
                <div class="col-xs-9">
                    <textarea rows="3" class="form-control input-sm" name="site_desc" placeholder="Deskripsi Aplikasi"><?php echo site_desc();?></textarea>
                    <!-- <input value="<?php echo site_desc();?>" type="text" name="site_desc" class="form-control input-sm" placeholder="Site description"> -->
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-3 control-label">Email</label>
                <div class="col-xs-4">
                    <input  value="<?php echo site_email();?>" type="text" name="site_email" class="form-control input-sm" placeholder="Email">
                </div>                            
            </div>
            <button id="submit" type="submit" class="btn btn-sm btn-primary btn-flat">Simpan Perubahan</button>
        <?php 
        echo form_close();
        ?>   
    </div>                 
</div>
    <script>
        jQuery.validator.addMethod("emailValid", function(value, element) {
          return this.optional(element) || /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(value);
        }, "Anda belum mengisi email dengan benar");

        $("#form").validate({
            errorElement: "em",
            rules: {
                site_title: {
                    requi#38A58E: true
                },
                site_tagline: {
                    requi#38A58E: true
                },
                site_desc: {
                    requi#38A58E: true
                },
                site_email: {
                    requi#38A58E: true,
                    emailValid: true
                }
            }
        });
    </script>